/**
*
*   @author Ranie Jade Ramiso
*
*/
#ifndef COLORS_H_INCLUDED
#define COLORS_H_INCLUDED

namespace Colors{

    //! how many times you can use a color, -1 signifies unlimited
    int colorUseCountLimit = -1;
    //! keeps track how many times a color has been used.
    int colorUseCount[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    //! number of colors available
    const int colorCount = 15;
    //! reset to default, the values of all variables under the namespace Colors
    void reset(){
        colorUseCountLimit = -1;
        for(int i = 0; i < colorCount; i++)
            colorUseCount[i] = 0;
    }

    enum TimeSlots{
        MW1     = 0,       //MW 7:30am - 8:55am
        TTH1    = 1,       //TTH 7:30am - 8:55am
        MW2     = 2,       //MW 9:00am - 10:25am
        TTH2    = 3,       //TTH 9:00am - 10:25am
        MW3     = 4,       //MW 10:30am - 11:55am
        TTH3    = 5,       //TTH 10:30am - 11:55am
        MW4     = 6,       //MW 12:00pm - 1:25pm
        TTH4    = 7,       //TTH 12:00pm - 1:25pm
        MW5     = 8,       //MW 1:30pm - 2:55pm
        TTH5    = 9,       //TTH 1:30pm - 2:55pm
        MW6     = 10,      //MW 4:00pm - 5:25pm
        TTH6    = 11,      //TTH 3:00pm - 4:25pm
        MW7     = 12,      //MW 5:25pm - 7:00pm
        TTH7    = 13,      //TTH 4:30pm - 5:55pm
        TTH8    = 14,      //TTH 6:00pm - 7:25pm
        None    = 15
    };


    //! given a value from the enum TimeSlots, this will return string, containing the text representation of that value
    const char *toString(Colors::TimeSlots color){
        const char *ret = NULL;
        switch(color){
            case MW1:
                ret = "MW 07:30am - 08:55am";
                break;
            case MW2:
                ret = "MW 09:00am - 10:25am";
                break;
            case MW3:
                ret = "MW 10:30am - 11:55am";
                break;
            case MW4:
                ret = "MW 12:00pm - 01:25pm";
                break;
            case MW5:
                ret = "MW 01:30pm - 02:55pm";
                break;
            case MW6:
                ret = "MW 04:00pm - 05:25pm";
                break;
            case MW7:
                ret = "MW 05:30pm - 06:55pm";
                break;
            case TTH1:
                ret = "TTH 07:30am - 08:55am";
                break;
            case TTH2:
                ret = "TTH 09:00am - 10:25am";
                break;
            case TTH3:
                ret = "TTH 10:30am - 11:55am";
                break;
            case TTH4:
                ret = "TTH 12:00pm - 01:25pm";
                break;
            case TTH5:
                ret = "TTH 01:30pm - 02:55pm";
                break;
            case TTH6:
                ret = "TTH 03:00pm - 04:25pm";
                break;
            case TTH7:
                ret = "TTH 04:30pm - 05:55pm";
                break;
            case TTH8:
                ret = "TTH 06:00pm - 07:25pm";
                break;
            default:
                ret = "Unknown";
                break;
        };
        return ret;
    }
}


#endif // COLORS_H_INCLUDED
